#region Using
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
#endregion Using

namespace CY.GFive.Core.Business
{
	public class ObserveTotal : Business.BusinessBase<ObserveTotal, int>
	{
		#region Fields and Properties

		private String des = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String Des
		{
			get { return des; }
			set
			{
				if (value != des)
				{
					MarkChanged("Des");
					des = value;
				}
			}
		}

		private int numAvail = 0;
		/// <summary>
		/// 
		/// </summary>
		public int NumAvail
		{
			get { return numAvail; }
			set
			{
				if (value != numAvail)
				{
					MarkChanged("NumAvail");
					numAvail = value;
				}
			}
		}

		private int numFinish = 0;
		/// <summary>
		/// 
		/// </summary>
		public int NumFinish
		{
			get { return numFinish; }
			set
			{
				if (value != numFinish)
				{
					MarkChanged("NumFinish");
					numFinish = value;
				}
			}
		}

		private int num = 0;
		/// <summary>
		/// 
		/// </summary>
		public int Num
		{
			get { return num; }
			set
			{
				if (value != num)
				{
					MarkChanged("Num");
					num = value;
				}
			}
		}

		private String peerCode = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String PeerCode
		{
			get { return peerCode; }
			set
			{
				if (value != peerCode)
				{
					MarkChanged("PeerCode");
					peerCode = value;
				}
			}
		}

		private String unitCode = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String UnitCode
		{
			get { return unitCode; }
			set
			{
				if (value != unitCode)
				{
					MarkChanged("UnitCode");
					unitCode = value;
				}
			}
		}

		#endregion Fields and Properties

		#region Constructors

		public ObserveTotal()
		{
		}

		#endregion Constructors

		#region Base overrides

		protected override void ValidationRules()
		{
		}

		protected override ObserveTotal DataSelect(int id)
		{
			return Services.DALService.ObserveTotalService.Select(id);
		}

		protected override void DataUpdate()
		{
			Services.DALService.ObserveTotalService.Update(this);
		}

		protected override void DataInsert()
		{
			Services.DALService.ObserveTotalService.Insert(this);
		}

		protected override void DataDelete()
		{
			Services.DALService.ObserveTotalService.Delete(this);
		}

		#endregion Base overrides
	}
}
